/*
 * @Author: czy
 * @Date: 2021-04-23 16:15:40
 * @LastEditTime: 2021-07-12 21:29:22
 */
#ifndef __STRING_H__
#define __STRING_H__

#include "stddef.h"
#include "stdbool.h"

#define LEFT 1
#define RIGHT 0

void strzero(char *str, int len);
int strcmp(char *str1, char *str2);
char *strcpy(char *dst, char *src);
int strlen(char *str);
char *strend(char *str);
char *extend(char *dst, char *src);
char *strcat(char *dst, char *src);
char *strmove(char *str, int n, char ch);
char *fill(char *str, char ch, int width, int align, int relative);
char *remove(char *dst, char *src, char ch1, char ch2);
int find(char *str, char ch);
void reverse(char *str);
char *strappend(char *str, char ch, int n);
char *strpop(char *str, int n);
char *strinsert(char *str, int index, char ch);
char *strdelete(char *str, int index);
int is_white(int ch);
int deblank(char *str);
int split(char **dst, char *src, char *delim);
int str2int(char *str);
char *int2str(char *str, int num);
int strindex(char *str1, char *str2);
char *strjoin(char *dst, char **src, int len, char *connector);
char *strreplace(char *dst, char *src, char *oldstr, char *newstr);
char *substring(char *dst, char *src, int start, int end);
void *memcpy(void *dst, const void *src, unsigned n);
void *memmove(void *dst, const void *src, unsigned n);
void *memset(void *src, int ch, unsigned n);
int memcmp(const void *buf1, const void *buf2, unsigned n);

#endif